This document creates plots from the Global Cost of Cash Benchmarking Study. The plots are written for HD dimensions:
require(ggplot2); require(data.table)
setwd("../data")
load("ccglobal.plot.Rda")
attr(costofcash$region, "levels")
## [1] "Aggregates"
## [2] "East Asia & Pacific (all income levels)"
## [3] "Europe & Central Asia (all income levels)"
## [4] "Latin America & Caribbean (all income levels)"
## [5] "Middle East & North Africa (all income levels)"
## [6] "North America"
## [7] "South Asia"
## [8] "Sub-Saharan Africa (all income levels)"
setattr(costofcash$region, "levels", c("Aggregates","Asia Pac","Eur Asia", "Latin Am Car","Mideast NAfr", "North Amer","South Asia","SS Africa"))
costofcash[,income:=ordered(income, c("High income: OECD", "High income: nonOECD", "Upper middle income", "Lower middle income","Low income","Aggregates","Not classified"))]
## iso2c TaxGDP Informality taxgap CurrIssueLCU CurrIssue wb3c
## 1: NA NA NA NA NA NA NA
## 2: NA NA NA NA NA NA NA
## 3: AF NA NA NA NA NA NA
## 4: AG NA NA NA NA NA NA
## 5: AL NA 32.06 NA NA NA NA
## ---
## 167: VU NA NA NA NA NA NA
## 168: WS NA NA NA NA NA NA
## 169: YE NA 26.47 NA NA NA YEM
## 170: ZA 28.15095 24.87 7.001142 628303 85.81942 ZAF
## 171: ZM 14.21847 42.08 5.983132 NA NA NA
## Country EUMember iCarry currcirc seigniorage seignGDP seignLOG
## 1: NA NA NA NA NA NA NA
## 2: NA NA NA NA NA NA NA
## 3: NA NA NA NA NA NA NA
## 4: NA NA NA NA NA NA NA
## 5: NA NA NA NA NA NA NA
## ---
## 167: NA NA NA NA NA NA NA
## 168: NA NA NA NA NA NA NA
## 169: Yemen, Rep. FALSE NA NA NA NA NA
## 170: South Africa FALSE 0.08 119056.7 1255.82 0 20.95
## 171: NA NA NA NA NA NA NA
## seignCAP transrate transcost timespent timepcap iso3c
## 1: NA NA NA NA NA CPV
## 2: NA NA NA NA NA EMU
## 3: NA 0.08406885 0.6626764 0.123328050 0.004348386 AFG
## 4: NA NA NA NA NA ATG
## 5: NA 0.11846066 2.5015534 0.236980256 0.076157320 ALB
## ---
## 167: NA 0.29424098 NA NA NA VUT
## 168: NA 0.27131311 NA NA NA WSM
## 169: NA 0.08024754 1.8757806 0.367952297 0.018099557 YEM
## 170: 173.53 0.08024754 1.5496988 0.137523860 0.003021889 ZAF
## 171: NA 0.24456393 0.1296331 0.006063055 0.000528192 ZMB
## cashTRX cashfees remit_MM remit_TRX payXrem transUSD
## 1: NA NA NA NA NA NA
## 2: NA NA NA NA NA NA
## 3: 5.0390829 NA 247.05482 1.2352741 4.079324 1.564281
## 4: NA NA 20.29261 0.1014630 NA 2.832352
## 5: 11.1058481 196.682101 1125.66452 5.6283226 1.973207 1.901446
## ---
## 167: NA NA 21.76589 0.1088294 NA 4.760030
## 168: NA NA 139.14708 0.6957354 NA 3.151800
## 169: 15.2347438 116.843230 1403.92000 7.0196000 2.170315 1.534317
## 170: 7.3822460 156.385943 1158.42181 5.7921090 1.274535 2.615936
## 171: 0.2515389 5.901423 46.30000 0.2315000 1.086561 2.107262
## country i.iso2c year pricelevel gdp region
## 1: NA NA NA NA NA NA
## 2: NA NA NA NA NA NA
## 3: Afghanistan AF 2012 0.3569678 57447187460 South Asia
## 4: Antigua and Barbuda AG 2012 0.6463405 1847438012 Latin Am Car
## 5: Albania AL 2012 0.4339084 28449628078 Eur Asia
## ---
## 167: Vanuatu VU 2012 1.0862351 724464090 Asia Pac
## 168: Samoa WS 2012 0.7192383 951386029 Asia Pac
## 169: Yemen, Rep. YE 2012 0.3501300 91374073008 Mideast NAfr
## 170: South Africa ZA 2012 0.5969545 640480412008 SS Africa
## 171: Zambia ZM 2012 0.4808755 42831093209 SS Africa
## income banks CIT_hat CITest
## 1: NA NA NA NA
## 2: NA NA NA NA
## 3: Low income 669.39796 5009545.1 5086552.8
## 4: Upper middle income 32.15342 435685.9 443062.4
## 5: Upper middle income 623.94102 5675792.1 5855511.3
## ---
## 167: Lower middle income 55.13544 1255566.1 1150514.6
## 168: Lower middle income 35.41498 534004.2 557019.9
## 169: Lower middle income 416.64255 3058283.8 2943366.9
## 170: Upper middle income 5444.49320 68137083.6 70164133.7
## 171: Lower middle income 625.12359 6302073.2 5742625.1
## Country.Name ATMper100k population ATMs GDPcap
## 1: Cabo Verde 43.6518197 491433.8 214.51980 6121.367
## 2: Euro area 89.5365078 333327169.4 298449.50690 35652.381
## 3: Afghanistan 0.6198279 29117537.8 180.47863 1743.256
## 4: Antigua and Barbuda 76.4142062 88147.8 67.35744 20702.613
## 5: Albania 32.5179456 2829122.8 919.97261 9952.317
## ---
## 167: Vanuatu 30.2213906 241787.0 73.07139 2907.391
## 168: Samoa 26.9822264 187484.6 50.58752 4866.138
## 169: Yemen, Rep. 3.7464074 23311325.8 873.33723 4070.272
## 170: South Africa 58.6913184 51591045.8 30279.46497 11837.022
## 171: Zambia 7.5777292 13657910.2 1034.95945 2881.232
## ATMUnitCost ATMNatlCost pop_MM ATM_MM
## 1: 1705.432 365849.00 0.4914338 0.36584900
## 2: NaN NaN 333.3271694 NaN
## 3: 1803.791 325545.71 29.1175378 0.32554571
## 4: 1569.077 105689.03 0.0881478 0.10568903
## 5: 1570.463 1444783.06 2.8291228 1.44478306
## ---
## 167: 1894.024 138398.99 0.2417870 0.13839899
## 168: 1711.324 86571.64 0.1874846 0.08657164
## 169: 2512.727 2194458.22 23.3113258 2.19445822
## 170: 1521.374 46066382.14 51.5910458 46.06638214
## 171: 1845.858 1910387.93 13.6579102 1.91038793
These charts validate the graphic design in markdown and ggplot2. Once we like the design, it should be plug and play.
Charts planned:
## Warning: Removed 7 rows containing non-finite values (stat_boxplot).
## Warning: Removed 10 rows containing non-finite values (stat_boxplot).
## Warning: Removed 20 rows containing missing values (geom_point).
## Warning: Removed 7 rows containing non-finite values (stat_boxplot).
## Warning: Removed 10 rows containing non-finite values (stat_boxplot).
## Warning: Removed 20 rows containing missing values (geom_point).
## Warning: Removed 4 rows containing missing values (geom_text).
## Warning: Removed 2 rows containing missing values (geom_text).
## Warning: Removed 1 rows containing missing values (geom_text).
## Warning: Removed 2 rows containing missing values (geom_text).
## Warning: Removed 1 rows containing missing values (geom_text).
Planned charts
plot1 <- ggplot(costofcash[!is.na(region)], aes(region, log(CITest)))
plot2 <- ggplot(costofcash[!is.na(income)], aes(income, log(CITest)))
plot3 <- ggplot(costofcash, aes(log(ATMNatlCost), log(CITest)))
## Base plots
plot1 + geom_boxplot() + coord_flip()
plot2 + geom_boxplot() + coord_flip()
plot3 + geom_point()
## Warning: Removed 21 rows containing missing values (geom_point).
## Drill down
plot1 + geom_boxplot(aes(fill=income)) + coord_flip() + scale_fill_brewer(palette="Set1")
plot2 + geom_boxplot(aes(fill=region)) + coord_flip() + scale_fill_brewer(palette="Dark2")
plot3 + geom_point(aes(color=income)) + scale_color_brewer(palette="Set1")
## Warning: Removed 21 rows containing missing values (geom_point).
plot3 + geom_point(aes(color=region)) + scale_color_brewer(palette="Dark2")
## Warning: Removed 21 rows containing missing values (geom_point).
## Regional Scatterplots
qplot(ATMNatlCost, CITest, data=costofcash[region=="SS Africa"], geom="text", color=income, label=iso2c, log="xy") + scale_color_brewer(palette="Dark2") +
labs(title="CIT Costs in Africa (Modeled) \n Regional Focus and Comparison to ATM Fleet Cost", x="ATM Fleet Costs (log scale USD)", y="CIT Modeled Fleet Costs (log scale USD)")
## Warning: Removed 4 rows containing missing values (geom_text).
qplot(ATMNatlCost, CITest, data=costofcash[region=="South Asia"], geom="text", color=income, label=iso2c, log="xy") + scale_color_brewer(palette="Dark2") +
labs(title="CIT Costs in South Asia (Modeled) \n Regional Focus and Comparison to ATM Fleet Cost", x="ATM Fleet Costs (log scale USD)", y="CIT Modeled Fleet Costs (log scale USD)")
qplot(ATMNatlCost, CITest, data=costofcash[region=="Asia Pac"], geom="text", color=income, label=iso2c, log="xy") + scale_color_brewer(palette="Dark2") +
labs(title="CIT Costs in Asia Pacific Region (Modeled) \n Regional Focus and Comparison to ATM Fleet Cost", x="ATM Fleet Costs (log scale USD)", y="CIT Modeled Fleet Costs (log scale USD)")
## Warning: Removed 2 rows containing missing values (geom_text).
qplot(ATMNatlCost, CITest, data=costofcash[region=="Mideast NAfr"], geom="text", color=income, label=iso2c, log="xy") + scale_color_brewer(palette="Dark2") +
labs(title="CIT Costs in Mideast and North Africa (Modeled) \n Regional Focus and Comparison to ATM Fleet Cost", x="ATM Fleet Costs (log scale USD)", y="CIT Modeled Fleet Costs (log scale USD)")
## Warning: Removed 1 rows containing missing values (geom_text).
qplot(ATMNatlCost, CITest, data=costofcash[region=="Latin Am Car"], geom="text", color=income, label=iso2c, log="xy") + scale_color_brewer(palette="Dark2") +
labs(title="CIT Costs in Latin America and Caribbean (Modeled) \n Regional Focus and Comparison to ATM Fleet Cost", x="ATM Fleet Costs (log scale USD)", y="CIT Modeled Fleet Costs (log scale USD)")
## Warning: Removed 1 rows containing missing values (geom_text).
## Income Group Focus
qplot(ATMNatlCost, CITest, data=costofcash[income=="High income: nonOECD"], geom="text", color=income, label=iso2c, log="xy") + scale_color_brewer(palette="Dark2") +
labs(title="CIT Costs in Africa (Modeled) \n Regional Focus and Comparison to ATM Fleet Cost", x="ATM Fleet Costs (log scale USD)", y="CIT Modeled Fleet Costs (log scale USD)")
## Warning: Removed 1 rows containing missing values (geom_text).
## Regional focus
plot1 + geom_boxplot() + coord_flip() + facet_wrap(~income)
plot2 + geom_boxplot() + coord_flip() + facet_wrap(~region)
plot3 + geom_point(aes(color=income)) + scale_color_brewer(palette="Set1") + facet_wrap(~region)
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 4 rows containing missing values (geom_point).
## Warning: Removed 11 rows containing missing values (geom_point).
plot3 + geom_point(aes(color=region)) + scale_color_brewer(palette="Dark2") + facet_wrap(~income)
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 3 rows containing missing values (geom_point).
## Warning: Removed 4 rows containing missing values (geom_point).
## Warning: Removed 11 rows containing missing values (geom_point).
Planned charts
## Hello
plot1 <- ggplot(costofcash, aes(log10(cashfees), log10(transcost)))
plot2 <- ggplot(costofcash, aes(log10(cashfees), log10(timespent)))
plot3 <- ggplot(costofcash, aes(log10(transcost), log10(timespent)))
plot4 <- ggplot(costofcash, aes(log10(transcost/pop_MM), log10(timespent/pop_MM)))
## Facets by region
plot1 + geom_point() + facet_wrap(~region) +
labs(title="Cost of Cash: Fees vs. Transit", x="Cash Fees (log scale, USD MM)", y="Transit Cost (log scale, USD MM)")
## Warning: Removed 15 rows containing missing values (geom_point).
## Warning: Removed 12 rows containing missing values (geom_point).
## Warning: Removed 16 rows containing missing values (geom_point).
## Warning: Removed 8 rows containing missing values (geom_point).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 3 rows containing missing values (geom_point).
## Warning: Removed 21 rows containing missing values (geom_point).
## Warning: Removed 10 rows containing missing values (geom_point).
plot2 + geom_point() + facet_wrap(~region)+
labs(title="Cost of Cash: Fees vs. Time Spent", x="Cash Fees (log scale, USD MM)", y="Time spent (log scale, minutes MM)")
## Warning: NaNs produced
## Warning: NaNs produced
## Warning: Removed 16 rows containing missing values (geom_point).
## Warning: Removed 12 rows containing missing values (geom_point).
## Warning: Removed 16 rows containing missing values (geom_point).
## Warning: Removed 8 rows containing missing values (geom_point).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 3 rows containing missing values (geom_point).
## Warning: Removed 21 rows containing missing values (geom_point).
## Warning: Removed 11 rows containing missing values (geom_point).
plot3 + geom_point() + facet_wrap(~region)+
labs(title="Cost of Cash: Transit vs. Time Spent", x="Cash Fees (log scale, USD MM)", y="Time spent (log scale, minutes MM)")
## Warning: NaNs produced
## Warning: NaNs produced
## Warning: Removed 13 rows containing missing values (geom_point).
## Warning: Removed 6 rows containing missing values (geom_point).
## Warning: Removed 13 rows containing missing values (geom_point).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 16 rows containing missing values (geom_point).
## Warning: Removed 11 rows containing missing values (geom_point).
plot4 + geom_point() + facet_wrap(~region)+
labs(title="Cost of Cash: Per capita transit vs. Per capita time spent", x="Transit cost per capita (log scale, USD MM)", y="Time spent per capita (log scale, minutes)")
## Warning: NaNs produced
## Warning: NaNs produced
## Warning: Removed 13 rows containing missing values (geom_point).
## Warning: Removed 6 rows containing missing values (geom_point).
## Warning: Removed 13 rows containing missing values (geom_point).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 16 rows containing missing values (geom_point).
## Warning: Removed 11 rows containing missing values (geom_point).
plot4 + geom_point(aes(color=region)) + scale_color_brewer(palette="Set1") +
labs(title="Cost of Cash: Per capita transit vs. Per capita time spent", x="Transit cost per capita (log scale, USD MM)", y="Time spent per capita (log scale, minutes)")
## Warning: NaNs produced
## Warning: NaNs produced
## Warning: Removed 64 rows containing missing values (geom_point).
## Color scatterplots by income
plot1 + geom_point(aes(color=income)) + scale_color_brewer(palette="RdBu") +
labs(title="Cost of Cash: Fees vs. Transit", x="Cash Fees (log scale, USD MM)", y="Transit Cost (log scale, USD MM)")
## Warning: Removed 86 rows containing missing values (geom_point).
plot2 + geom_point(aes(color=income)) + scale_color_brewer(palette="RdBu") +
labs(title="Cost of Cash: Fees vs. Time Spent", x="Cash Fees (log scale, USD MM)", y="Time spent (log scale, minutes MM)")
## Warning: NaNs produced
## Warning: NaNs produced
## Warning: Removed 88 rows containing missing values (geom_point).
plot3 + geom_point(aes(color=income)) + scale_color_brewer(palette="RdBu") +
labs(title="Cost of Cash: Transit vs. Time Spent", x="Cash Fees (log scale, USD MM)", y="Time spent (log scale, minutes MM)")
## Warning: NaNs produced
## Warning: NaNs produced
## Warning: Removed 64 rows containing missing values (geom_point).
plot4 + geom_point(aes(color=income)) + scale_color_brewer(palette="RdBu") +
labs(title="Cost of Cash: Per capita transit vs. Per capita time spent", x="Transit cost per capita (log scale, USD MM)", y="Time spent per capita (log scale, minutes)")
## Warning: NaNs produced
## Warning: NaNs produced
## Warning: Removed 64 rows containing missing values (geom_point).
## Focus by region
qplot(log10(transcost), log10(cashfees), data=costofcash[region=="SS Africa"], geom="text", label=iso2c, color=income) + scale_color_brewer(palette="Set1")+
labs(title="Household Cash Costs: Cash Fees and Transit Costs \n Regional Focus: Sub-Saharan Africa", x="Transit Cost (log scale, USD MM)", y="Cash Fees (log scale, USD MM)")
## Warning: Removed 21 rows containing missing values (geom_text).
qplot(log10(transcost), log10(cashfees), data=costofcash[region=="Asia Pac"], geom="text", label=iso2c, color=income) + scale_color_brewer(palette="Set1")+
labs(title="Household Cash Costs: Cash Fees and Transit Costs \n Regional Focus: East Asia Pacific", x="Transit Cost (log scale, USD MM)", y="Cash Fees (log scale, USD MM)")
## Warning: Removed 15 rows containing missing values (geom_text).
qplot(log10(transcost), log10(cashfees), data=costofcash[region=="Eur Asia"], geom="text", label=iso2c, color=income) + scale_color_brewer(palette="Set1")+
labs(title="Household Cash Costs: Cash Fees and Transit Costs \n Regional Focus: Europe and Central Asia", x="Transit Cost (log scale, USD MM)", y="Cash Fees (log scale, USD MM)")
## Warning: Removed 12 rows containing missing values (geom_text).
qplot(log10(transcost), log10(cashfees), data=costofcash[region=="Latin Am Car"], geom="text", label=iso2c, color=income) + scale_color_brewer(palette="Set1")+
labs(title="Household Cash Costs: Cash Fees and Transit Costs \n Regional Focus: Latin America and Caribbean", x="Transit Cost (log scale, USD MM)", y="Cash Fees (log scale, USD MM)")
## Warning: Removed 16 rows containing missing values (geom_text).
qplot(log10(transcost), log10(cashfees), data=costofcash[region=="Mideast NAfr"], geom="text", label=iso2c, color=income) + scale_color_brewer(palette="Set1")+
labs(title="Household Cash Costs: Cash Fees and Transit Costs \n Regional Focus: Mideast and North Africa", x="Transit Cost (log scale, USD MM)", y="Cash Fees (log scale, USD MM)")
## Warning: Removed 8 rows containing missing values (geom_text).
qplot(log10(transcost), log10(cashfees), data=costofcash[region=="South Asia"], geom="text", label=iso2c, color=income) + scale_color_brewer(palette="Set1")+
labs(title="Household Cash Costs: Cash Fees and Transit Costs \n Regional Focus: South Asia", x="Transit Cost (log scale, USD MM)", y="Cash Fees (log scale, USD MM)")
## Warning: Removed 3 rows containing missing values (geom_text).
Planned charts
## Value of seigniorage
plot1 <- ggplot(costofcash, aes(log10(gdp*10^-6), log10(seigniorage)))
plot2 <- ggplot(costofcash[!is.na(region),], aes(region, log10(seigniorage)))
plot3 <- ggplot(costofcash[!is.na(income),], aes(income, log10(seigniorage)))
plot1 + geom_text(aes(color=region, label=iso2c)) + scale_color_brewer(palette="Dark2")
## Warning: Removed 109 rows containing missing values (geom_text).
plot1 + geom_point(aes(color=region)) + scale_color_brewer(palette="Dark2")
## Warning: Removed 109 rows containing missing values (geom_point).
plot2 + geom_boxplot(aes(color=region)) + scale_color_brewer(palette="Dark2") + coord_flip()
## Warning: Removed 98 rows containing non-finite values (stat_boxplot).
plot3 + geom_boxplot(aes(color=income)) + scale_color_brewer(palette="Dark2") + coord_flip()
## Warning: Removed 98 rows containing non-finite values (stat_boxplot).
plot11 <- ggplot(costofcash[region=="SS Africa" & !is.na(seigniorage),], aes(log10(gdp*10^-6), log10(seigniorage), label=iso2c, color=income))
plot12 <- ggplot(costofcash[region=="South Asia" & !is.na(seigniorage),], aes(log10(gdp*10^-6), log10(seigniorage), label=iso2c, color=income))
plot13 <- ggplot(costofcash[region=="Mideast NAfr" & !is.na(seigniorage),], aes(log10(gdp*10^-6), log10(seigniorage), label=iso2c, color=income))
plot14 <- ggplot(costofcash[region=="Latin Am Car" & !is.na(seigniorage),], aes(log10(gdp*10^-6), log10(seigniorage), label=iso2c, color=income))
plot15 <- ggplot(costofcash[region=="Eur Asia" & !is.na(seigniorage),], aes(log10(gdp*10^-6), log10(seigniorage), label=iso2c, color=income))
plot16 <- ggplot(costofcash[region=="Asia Pac" & !is.na(seigniorage),], aes(log10(gdp*10^-6), log10(seigniorage), label=iso2c, color=income))
plot11 + geom_text() +
scale_color_brewer(palette="Set1") + labs(title="Seigniorage Income Vs. GDP \n Regional Focus: Africa", x="GDP at PPP (log scale, USD MM)", y="Seigniorage (log scale, USD MM)")
plot12 + geom_text() +
scale_color_brewer(palette="Set1") + labs(title="Seigniorage Income Vs. GDP \n Regional Focus: South Asia", x="GDP at PPP (log scale, USD MM)", y="Seigniorage (log scale, USD MM)")
plot13 + geom_text() +
scale_color_brewer(palette="Set1") + labs(title="Seigniorage Income Vs. GDP \n Regional Focus: Mideast North Africa", x="GDP at PPP (log scale, USD MM)", y="Seigniorage (log scale, USD MM)")
plot14 + geom_text() +
scale_color_brewer(palette="Set1") + labs(title="Seigniorage Income Vs. GDP \n Regional Focus: Latin America Caribbean", x="GDP at PPP (log scale, USD MM)", y="Seigniorage (log scale, USD MM)")
plot15 + geom_text() +
scale_color_brewer(palette="Set1") + labs(title="Seigniorage Income Vs. GDP \n Regional Focus: Europe and Central Asia", x="GDP at PPP (log scale, USD MM)", y="Seigniorage (log scale, USD MM)")
plot16 + geom_text() +
scale_color_brewer(palette="Set1") + labs(title="Seigniorage Income Vs. GDP \n Regional Focus: East Asia Pacific", x="GDP at PPP (log scale, USD MM)", y="Seigniorage (log scale, USD MM)")
## Cost of Currency Issuance
plot1 <- ggplot(costofcash, aes(log10(gdp*10^-6), log10(CurrIssue)))
plot2 <- ggplot(costofcash[!is.na(region),], aes(region, log10(CurrIssue)))
plot3 <- ggplot(costofcash[!is.na(income),], aes(income, log10(CurrIssue)))
plot1 + geom_text(aes(color=region, label=iso2c)) + scale_color_brewer(palette="Dark2") + labs(title="Currency Issuance", x="GDP (log scale, USD MM)", y="Currency Issuance Costs (log scale, USD MM)")
## Warning: Removed 126 rows containing missing values (geom_text).
plot1 + geom_point(aes(color=region)) + scale_color_brewer(palette="Dark2")+ labs(title="Currency Issuance", x="GDP (log scale, USD MM)", y="Currency Issuance Costs (log scale, USD MM)")
## Warning: Removed 126 rows containing missing values (geom_point).
plot2 + geom_boxplot(aes(color=region)) + scale_color_brewer(palette="Dark2") + coord_flip()+ labs(title="Curreny Issuance \n Boxplots by Region", x=NULL, y="Currency Issuance Costs (log scale, USD MM)")
## Warning: Removed 115 rows containing non-finite values (stat_boxplot).
plot3 + geom_boxplot(aes(color=income)) + scale_color_brewer(palette="Dark2") + coord_flip()+ labs(title="Currency Issuance \n Boxplots by Income Group", x=NULL, y="Currency Issuance Costs (log scale, USD MM)")
## Warning: Removed 115 rows containing non-finite values (stat_boxplot).
## Currency issuance vs. seigniorage revenue
plot1 <- ggplot(costofcash, aes(log10(CurrIssue), log10(seigniorage), color=income, label=iso2c)) + labs(title="Currency Issuance vs. Seigniorage Revenue", x="Currency Issuance (log scale, USD MM)", y="Seigniorage Revenue (log scale, USD MM)")
plot11 <- ggplot(costofcash[region=="SS Africa"], aes(log10(CurrIssue), log10(seigniorage), color=income, label=iso2c)) + labs(title="Currency Issuance vs. Seigniorage Revenue \n Regional Focus: Africa", x="Currency Issuance (log scale, USD MM)", y="Seigniorage Revenue (log scale, USD MM)")
plot12 <- ggplot(costofcash[region=="South Asia"], aes(log10(CurrIssue), log10(seigniorage), color=income, label=iso2c)) + labs(title="Currency Issuance vs. Seigniorage Revenue \n Regional Focus: South Asia", x="Currency Issuance (log scale, USD MM)", y="Seigniorage Revenue (log scale, USD MM)")
plot13 <- ggplot(costofcash[region=="Mideast NAfr"], aes(log10(CurrIssue), log10(seigniorage), color=income, label=iso2c)) + labs(title="Currency Issuance vs. Seigniorage Revenue \n Regional Focus: Mideast and North Africa", x="Currency Issuance (log scale, USD MM)", y="Seigniorage Revenue (log scale, USD MM)")
plot14 <- ggplot(costofcash[region=="Asia Pac"], aes(log10(CurrIssue), log10(seigniorage), color=income, label=iso2c)) + labs(title="Currency Issuance vs. Seigniorage Revenue \n Regional Focus: East Asia Pacific", x="Currency Issuance (log scale, USD MM)", y="Seigniorage Revenue (log scale, USD MM)")
plot15 <- ggplot(costofcash[region=="Latin Am Car"], aes(log10(CurrIssue), log10(seigniorage), color=income, label=iso2c)) + labs(title="Currency Issuance vs. Seigniorage Revenue \n Regional Focus: Latin America Caribbean", x="Currency Issuance (log scale, USD MM)", y="Seigniorage Revenue (log scale, USD MM)")
plot16 <- ggplot(costofcash[region=="Eur Asia"], aes(log10(CurrIssue), log10(seigniorage), color=income, label=iso2c)) + labs(title="Currency Issuance vs. Seigniorage Revenue \n Regional Focus: Europe Central Asia", x="Currency Issuance (log scale, USD MM)", y="Seigniorage Revenue (log scale, USD MM)")
Planned charts
## Hello
plot1 <- ggplot(costofcash, aes(seigniorage/gdp*10^8, taxgap, color=income, label=iso2c))
plot2 <- ggplot(costofcash[region=="SS Africa",], aes(region, taxgap, color=income))
plot3 <- ggplot(costofcash[!is.na(income),], aes(income, taxgap))
plot4 <- ggplot(costofcash, aes(GDPcap, taxgap, color=income, label=iso2c))
plot11 <- ggplot(costofcash[region=="SS Africa",], aes(seigniorage/gdp*10*8, taxgap, color=income, label=iso2c))
plot12 <- ggplot(costofcash[region=="South Asia",], aes(seigniorage/gdp*10*8, taxgap, color=income, label=iso2c))
plot13 <- ggplot(costofcash[region=="Mideast NAfr",], aes(seigniorage/gdp*10*8, taxgap, color=income, label=iso2c))
plot14 <- ggplot(costofcash[region=="Latin Am Car",], aes(seigniorage/gdp*10*8, taxgap, color=income, label=iso2c))
plot15 <- ggplot(costofcash[region=="Eur Asia",], aes(seigniorage/gdp*10*8, taxgap, color=income, label=iso2c))
plot16 <- ggplot(costofcash[region=="Asia Pac",], aes(seigniorage/gdp*10*8, taxgap, color=income, label=iso2c))
plot1 + geom_point() + scale_color_brewer(palette="RdBu") + labs(title="Tax Gap vs. Seigniorage Revenue", x="Seigniorage (% of GDP)", y="Tax Gap (% of GDP)")
## Warning: Removed 116 rows containing missing values (geom_point).
plot1 + geom_text() + scale_color_brewer(palette="RdBu") + labs(title="Tax Gap vs. Seigniorage Revenue", x="Seigniorage (% of GDP)", y="Tax Gap (% of GDP)")
## Warning: Removed 116 rows containing missing values (geom_text).
plot11 + geom_text() + scale_color_brewer(palette="RdBu") + labs(title="Tax Gap \n Regional Focus: Africa", x="Seigniorage (% of GDP)", y="Tax Gap (% of GDP)")
## Warning: Removed 34 rows containing missing values (geom_text).
plot12 + geom_text() + scale_color_brewer(palette="RdBu") + labs(title="Tax Gap \n Regional Focus: South Asia", x="Seigniorage (% of GDP)", y="Tax Gap (% of GDP)")
## Warning: Removed 4 rows containing missing values (geom_text).
plot13 + geom_text() + scale_color_brewer(palette="RdBu") + labs(title="Tax Gap \n Regional Focus: Mideast North Africa", x="Seigniorage (% of GDP)", y="Tax Gap (% of GDP)")
## Warning: Removed 10 rows containing missing values (geom_text).
plot14 + geom_text() + scale_color_brewer(palette="RdBu") + labs(title="Tax Gap \n Regional Focus: Latin America Caribbean", x="Seigniorage (% of GDP)", y="Tax Gap (% of GDP)")
## Warning: Removed 28 rows containing missing values (geom_text).
plot15 + geom_text() + scale_color_brewer(palette="RdBu") + labs(title="Tax Gap \n Regional Focus: Europe Central Asia", x="Seigniorage (% of GDP)", y="Tax Gap (% of GDP)")
## Warning: Removed 15 rows containing missing values (geom_text).
plot16 + geom_text() + scale_color_brewer(palette="RdBu") + labs(title="Tax Gap \n Regional Focus: East Asia Pacific", x="Seigniorage (% of GDP)", y="Tax Gap (% of GDP)")
## Warning: Removed 14 rows containing missing values (geom_text).
Data is not yet ready.